home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Eagles Nest BBS 7
/
Eagles_Nest_Mac_Collection_Disc_7.TOAST
/
General Communication
/
T3000ARA
< prev
next >
Wrap
Text File
|
1992-02-04
|
8KB
|
329 lines
! "Telebit T3000 Modem 11/11/91" JFK
! 11/14/91 JFK - Added a ton o' comments...
! 11/23/91 JFK - Cleaned up comments a little bit more,
! and added S11=50 again.
! 12/2/91 JFK - Took S11 back out again.
! 12/9/91 JFK - Added the pinouts for the RTS/CTS cable to the comments
! Since you have to make a hardware handshaking cable.
! 1/16/92 JFK - Add a bunch more comments about the cable.
!
! Cable needed for the Telebit T3000.
! Din-8 DB-25
! 1 (DTR) 4,20 (RTS, DTR)
! 2 (CTS) 5 (CTS) ** Note, normally 2(CTS)->6 (DSR) on other mac cables.
! 3 (TxD-) 2 (TD)
! 4 (SG) 7 (SG)
! 5 (RxD-) 3 (RD)
! 6 (TxD+) Not Connected
! 7 (GPi) 8 (DCD)
! 8 (RxD+) 7 (SG)
!
! Note: The downside of the above cable is that DSR from the modem
! is no longer connected to the Mac. This does not let your
! Macintosh communication software use the DSR signal to detect
! carrier loss. And since the Macintosh Serial driver does not
! support the GPi input...you are sort of stuck, unless
! your communications software does use the GPi input. Or
! Apple builds GPi support into the serial driver.
!
! Note: Since you are tying DTR and RTS together, you must tell the modem to
! ignore DTR (&D0) when using this cable with other communications
! applications. Otherwise, if you use RTS handshaking from the Mac,
! the modem will drop connection the first time the Mac asserts
! RTS to the modem.
!
! OR
!
! If you want to use DTR to make the modem disconnect, you can
! use only CTS handshaking from the modem to the Macintosh.
! This is what ARA does so it can force the modem to hang up,
! and the modem can tell the Macintosh to stop sending data.
! This assumes that the Macintosh will always be able to accept
! data from the modem (which will not be true if you are talking
! to the modem at 57.6KBps with V.42Bis. There will be times
! when the Macintosh will need to hold off the data from the modem).
!
! In summary, with this cable:
!
! If you want to have full hardware handshaking (CTS/RTS), you
! cannot use DTR to control the modem, and you must set the
! modem to ignore DTR.
!
! If you want to control the modem with DTR, you can only have
! CTS hardware handshaking so the modem can tell the Macintosh
! to stop sending data.
!
@ORIGINATE
@ANSWER
!
! Talk to the modem at 19,200 bps. the T3000 should auto-baud this
! unless the user has locked the port to a particular speed. If it
! is locked to a different speed, the user will need to change that.
!
serreset 19200, 0, 8, 1
!
! First recall the factory configuration
! F9 is the built in preconfigured setting for CTS/RTS handshaking.
! Since it's possible for the user to modify F0 parameters, this is a
! little safer.
!
! AT&F9 sets:
! &C1 - DCD is on after connect
! &D2 - DTR on/off disconnects
! S58=2 - Use RTS/CTS flow control in full-duplex mode
!
settries 0
matchclr
@LABEL 1
matchstr 1 4 "OK\13\10"
write "AT&F9\13"
matchread 30
inctries
iftries 2 59
! Modem is not responding, reset and send a break
DTRClear
pause 5
DTRSet
SBreak
jump 1
!
! Next, Set up the configuration: drop connection after losing DTR
! Turn off auto answer and command echo.
!
! &D3 - DTR on/off resets modem
! S0=0 - Don't answer calls
! E0 - Turn command echo off
!
@LABEL 4
matchclr
pause 5
matchstr 1 5 "OK\13\10"
write "AT&D3S0=0E0\13"
matchread 30
jump 59
!
! Next, disable MNP and error control
! turn on internal buffering (for V.32bis),
! and extended result codes (CTS/RTS flow control was set when we
! issued &F9, so we don't need to
! do it here).
!
! S180=0 - Turn off all error detection/correction (ARA does MNP and
! compression itself. It needs these turned off in the modem).
! S181=1 - Turn *on* DTE <-> line buffering if there is no error control
! (which there is not). Since we will be
! talking to the Mac at 19,200 bps no matter
! what speed we connect at, we need this on.
! X2 - Issue extended result codes. This will display busy, connect XXX, etc.
! X2 will say "CONNECT XXX" Where XXX is the line speed (as opposed to
! DTE speed). We need this so we can tell ARA what speed we are really
! communicating at (for timing).
!
@LABEL 5
pause 5
matchstr 1 6 "OK\13\10"
write "ATS180=0S181=1X2\13"
matchread 30
jump 59
!
! If speaker on flag is true, jump to label 8. Else turn off the speaker
!
@LABEL 6
ifstr 2 8 "1"
pause 5
matchstr 1 8 "OK\13\10"
write "ATM0\13"
matchread 30
jump 59
!
! The modem is ready so enable answering, or originate a call
!
@LABEL 8
pause 5
ifANSWER 30
note "Dialing ^1" 3
write "ATDT^1\13"
!
@LABEL 9
matchstr 1 11 "CONNECT 1200\13\10"
matchstr 2 12 "CONNECT 2400\13\10"
matchstr 3 13 "CONNECT 4800\13\10"
matchstr 4 19 "CONNECT 7200\13\10"
matchstr 5 14 "CONNECT 9600\13\10"
matchstr 6 20 "CONNECT 12000\13\10"
matchstr 7 18 "CONNECT 14400\13\10"
matchstr 8 50 "NO CARRIER\13\10"
matchstr 9 50 "ERROR\13\10"
matchstr 10 52 "NO DIAL TONE\13\10"
matchstr 11 53 "BUSY\13\10"
matchstr 12 54 "NO ANSWER\13\10"
matchread 700
jump 59
!
! Notice that all we do for different connect speeds is issue a
! "CommunicatingAt" command. Remember, we locked the interface speed
! to 19,200 bps so we don't want to reset the serial speed after we connect.
! CommuicatingAt tells ARA what the actual line speed is so that it
! can set it's timers appropriately. I guess your performance would be
! sub-optimal if you don't set this...
!
@LABEL 11
note "Communicating at 1200 bps." 2
CommunicatingAt 1200
jump 15
!
@LABEL 12
note "Communicating at 2400 bps." 2
CommunicatingAt 2400
jump 15
!
@LABEL 13
note "Communicating at 4800 bps." 2
CommunicatingAt 4800
jump 15
!
@LABEL 19
note "Communicating at 7200 bps." 2
CommunicatingAt 7200
jump 15
!
@LABEL 14
note "Communicating at 9600 bps." 2
CommunicatingAt 9600
jump 15
!
@LABEL 20
note "Communicating at 12000 bps." 2
CommunicatingAt 12000
jump 15
!
@LABEL 18
note "Communicating at 14400 bps." 2
CommunicatingAt 14400
jump 15
!
! Set CTS handshaking ON in the serial port (that's the 1 in the HSReset
! command below )
!
@LABEL 15
HSReset 0 1 0 0 0 0
ifANSWER 16
pause 30
@LABEL 16
exit 0
!
! @ANSWER
! Set up the modem to answer
!
@LABEL 30
write "ATS0=1\13"
matchstr 1 31 "OK\13\10"
matchread 30
jump 59
!
@LABEL 31
matchstr 1 32 "RING\13\10"
matchstr 2 11 "CONNECT 1200\13\10"
matchstr 3 12 "CONNECT 2400\13\10"
matchstr 4 13 "CONNECT 4800\13\10"
matchstr 5 19 "CONNECT 7200\13\10"
matchstr 6 14 "CONNECT 9600\13\10"
matchstr 7 20 "CONNECT 12000\13\10"
matchstr 8 18 "CONNECT 14400\13\10"
matchstr 9 50 "NO CARRIER\13\10"
matchstr 10 50 "ERROR\13\10"
matchstr 11 52 "NO DIAL TONE\13\10"
matchstr 12 53 "BUSY\13\10"
matchstr 13 54 "NO ANSWER\13\10"
matchread 700
jump 31
!
@LABEL 32
userhook 1
note "Answering phone..." 2
jump 31
!
! 50: error messages
!
@LABEL 50
exit -6021
!
@LABEL 52
exit -6020
!
@LABEL 53
exit -6022
!
@LABEL 54
exit -6023
!
@LABEL 59
exit -6019
!
! Hang up the modem
!
@HANGUP
@LABEL 60
settries 0
HSReset 0 0 0 0 0 0
@LABEL 61
write "ATH\13"
matchclr
matchstr 1 63 "NO CARRIER\13\10"
matchstr 2 63 "OK\13\10"
matchstr 3 63 "ERROR\13\10"
matchread 30
inctries
iftries 3 63
! no response, try escape sequence
write "+++"
matchclr
matchstr 1 62 "OK\13\10"
matchread 15
!
! No Response from modem, toggle DTR
!
DTRClear
pause 5
DTRSet
jump 61
!
@LABEL 62
! Pause 1 second before to ensure we meet the escape time delay
pause 10
Flush
write "ATH\13"
matchstr 1 63 "OK\13\10"
matchstr 2 63 "NO CARRIER\13\10"
matchstr 3 63 "ERROR\13\10"
matchread 30
jump 61
!
!
! recall the factory settings. Use &F9 again (see note at top of script)
!
@LABEL 63
matchclr
matchstr 1 64 "OK\13\10"
pause 15
write "AT&F9\13"
matchread 30
!
! Turn off auto answer, set S51 so modem will check interface
! speed on next connection. If you don't do this, the modem
! will not try to autobaud, with the result being it exits the
! script with an error
!
! S51=255 - Autobaud (9600 bps default)
! S0=0 - Don't try to answer the phone
!
@LABEL 64
pause 5
matchstr 1 65 "OK\13\10"
write "ATS51=255S0=0\13"
matchread 20
!
@LABEL 65
exit 0